FROM docker.io/rackspacedot/python37
MAINTAINER xiaobo@yunshicloud.com
LABEL version="1.0" description="这是新闻智能拆条分析服务的web接口"
ENV WORK_HOME /root/newspower
ENV PATH $WORK_HOME/bin:$PATH
RUN mkdir -p "$WORK_HOME"
RUN mkdir -p "$WORK_HOME/conf"
RUN mkdir -p "$WORK_HOME/web"
RUN mkdir -p "$WORK_HOME/public"
WORKDIR $WORK_HOME
RUN rm /etc/localtime
RUN set -x \
	&& pip install flask==1.0.2 \
	&& pip install flask==2.1.1 \
	&& pip install DBUtils==1.2 \
	&& pip install uwsgi==2.0.20
	
ADD ./localtime /etc
ADD ./web.tar $WORK_HOME
ADD ./uwsgi.ini /etc/
EXPOSE 5000

ENTRYPOINT ["uwsgi"]
CMD ["--ini", "/etc/uwsgi.ini"]
